package com.jackiechancinema.ssm.controller;

import com.jackiechancinema.ssm.service.Impl.LoginServiceImpl;
import com.jackiechancinema.ssm.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
public class LoginController {
    @Autowired
    private LoginServiceImpl service;
    @RequestMapping("/main/login")
    @ResponseBody
    public R login(String name, String password, HttpSession session){
        return service.login(name,password,session);
    }
}
